package com.netty.service;

import com.netty.data.Msg;
import com.netty.mapper.MsgMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

@Component
public class TaskService {


    @Autowired
    private MsgMapper msgMapper;

    @Async
    public void insertMsg(Msg msg){
        msgMapper.insertMsg(msg);
    }
}
